<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <link rel="shortcut icon" href="../favicon.ico">
    <title>圣诞元旦 好礼不断</title>
    
    <link rel="stylesheet" href="../../../../assets/css/home-animate.css">
    <style type="text/css">
    html,
    body {
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        font-size: 100%;
        background-color: #fff1da;
    }
    
    .christmas-poster {
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
    }
    
    .poster {
        height: 100%;
        width: 100%;
        border-style: none;
    }
    

    

    </style>
</head>

<body>
    <div class="christmas-poster">
        <img class="poster" src="../../../../assets/image/prize_home_bg-xmas.jpg">
        <span class="sprite_global"></span>
    </div>
    
    <div class="operation-guide">
        <!-- <span>点击进入表单填写</span> -->
        <!-- <span class="shine">点击进入表单填写页面</span> -->
        <p class="shine">[  点击进入表单填写页面  ]</p>
    </div>

    <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.js"></script>
    <script src="../../../../assets/js/jweixin-1.0.0.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../../assets/js/social_share.v2.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">
    $('body').bind('touchmove', function(ev) {
        ev.preventDefault();
    });

    $("*").dblclick(function(e) {
        e.preventDefault();
    });
    
    
    jQuery(document).ready(function($) {
        if (window.history && window.history.pushState) {
            // window.history.pushState('forward', null, '/pana-campaigns/pages/portal.html');
            window.history.pushState('forward', null, location.href.split('#')[0]);
            $(window).on('popstate', function() {
                console.log('Back button was pressed.');
                window.location = "/pana-campaigns/pages/portal.html?v=" + Math.random().toString(36).substring(7);
            });
        }
    });
    
    var counter = 0;

    var gotoFormPage = function() {
        window.location = "/pana-campaigns/pages/campaigns/prize-cashing/2016-12-25/form.html";
    };
    
    $(".christmas-poster").click(gotoFormPage);
    $(".operation-guide").click(gotoFormPage);

    $(window).load(function() {

        // 初始化社交分享参数
        // var shareUrl = "http://mp.weixin.qq.com/s?__biz=MjM5NjQzNjYxNA==&mid=2650048194&idx=1&sn=4bc5777608565592b68a3763b8669af5&chksm=bee9692b899ee03d3a725c07a68e5197998e7fd55230d25d5e34a7c41f83dc22e804df48d72f&mpshare=1&scene=1&srcid=0926k4EPcci2IYZRx4wulmFi#rd";
        // var imageUlr = "http://mmbiz.qpic.cn/mmbiz_jpg/J6L03A7Jqw77I7AoO0CcddgwrPQfSiadtVQZQMYj8Zqh4bnftqzsdrOxcswZuGiboyNRfzmIibZiaIv6ZXYUGzGMug/300?wx_fmt=jpeg";
        // var descriptionText = "买小家电还能免费赢取出国旅游？没错！一年只有一次的松下国庆大促即将拉开序幕“壕”礼疯狂送起来！！！在指定实体";

        $.ajax({
			type:'get',
			dataType:'json',
			url:'/pana-BE-RESTful/wx/init',
			data:{
				'currentUrl': location.href.split('#')[0]
			},
			success:function(data){
				window.myShareData = data.result;
				wx.config({
		 		    debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
		 		    appId: myShareData.appid, // 必填，公众号的唯一标识
		 		    timestamp: myShareData.timestamp, // 必填，生成签名的时间戳
		 		    nonceStr: myShareData.noncestr, // 必填，生成签名的随机串
		 		    signature: myShareData.signature,// 必填，签名，见附录1
		 		    jsApiList: ['onMenuShareTimeline' ,'onMenuShareAppMessage'] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
		 		});

		 		wx.ready(function() {
                wx.onMenuShareTimeline({
                    title: titleText, // 分享标题
                    link: shareUrl,
                    imgUrl: imageUlr, // 分享图标
                    success: function () {
                    },
                    cancel: function () {
                    }
                });

                wx.onMenuShareAppMessage({
                    title: titleText, // 分享标题
                    desc:  descriptionText, // 分享描述
                    link: shareUrl,
                    imgUrl: imageUlr, // 分享图标
                    success: function () {
                    },
                    cancel: function () {
                    }
                });
	 		});

		 		wx.error(function(res){
		 			console.log(res);
		 		});
			}
		});
    });
    </script>
</body>

</html>
